import axios from '@/libs/api.request'

const prefix = '/web/course'
const CourseApi = {
  findUserAllCourseList() {
    return axios.request({
      url: prefix + '/userAllCourseList',
      method: 'get'
    })
  },
  pageResult(plan) {
    return axios.request({
      url: prefix + '/pageResult',
      data: plan,
      method: 'post'
    })
  },
  saveOrUpdate(plan) {
    return axios.request({
      url: prefix + "/saveOrUpdate",
      method: 'post',
      data: plan
    })
  },
  delete(id) {
    return axios.request({
      url: prefix + '/' + id,
      method: 'delete'
    })
  },
  get(id) {
    return axios.request({
      url: prefix + '/' + id,
      method: 'get'
    })
  }
}

export default CourseApi
